Skip to content

fix(ios): deleting a baseline's simulator removes its launchd overrides folder - #1813

Merged
V3RON merged 4 commits into
mainfrom
bug/1780
Nov 24, 2026
Merged

V3RON merged 4 commits into
mainfrom
bug/1780

Conversation

@V3RON

@V3RON V3RON commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1780

Status

Implement: done (35/35 green) Review: round 1, 0 findings Hardware: n/a Gate: not run
Next: gate

Done when

  • Deleting a source removes its overrides folder too, as deleting a lease does. — index-seed-sources.test.ts covers destroySource, the making-row sweep and a failed save; probed by deleting the removeOverrides call (test fails)

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 0.5M.
Runs: 3. Cost USD: 0.492. Agent seconds: 154.

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Seed simulator cleanup now removes the simulator’s SlimBoot overrides after simulator deletion succeeds. If deletion fails, cleanup does not remove the overrides. Tests cover successful and failed deletion outcomes across baseline cleanup paths. The iOS driver documentation now states that each seed deletion removes its overrides folder after simctl delete.

Severity of issue fixed: Low

Merge Risk: Minimal · up to d60f7

Deleting an iOS baseline simulator now also removes its launchd overrides folder, and the failure-path tests protect that behavior. A very narrow race with a concurrent clone of a seed being deleted could leave that clone without copied overrides. It is unlikely to matter in practice, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: deleting a baseline's simulator now removes its launchd overrides folder. It matches the raw summary, which adds override removal to Seeds.#deleteSeedSimulator, and th…
Description check Passed The description references issue #1780 and states the done criterion: deleting a source removes its overrides folder, as deleting a lease does. It names the test file index-seed-sources.test.ts and th…
Linked Issues check Passed Issue #1780 requires that deleting an iOS source also removes its launchd overrides folder, as lease deletion does, and that the same cleanup applies to #removeLeftover and failed-save cleanup. At the…
Out of Scope Changes check Passed The whole-PR changes are: a 2-line addition in seeds.ts #deleteSeedSimulator that implements the issue requirement; a 121-line test addition in index-seed-sources.test.ts that verifies the same over…
Full details: Title check

Explanation

The title names the main change: deleting a baseline's simulator now removes its launchd overrides folder. It matches the raw summary, which adds override removal to Seeds.#deleteSeedSimulator, and the linked objective (issue #1780) requesting the same cleanup. The title is concise, uses the conventional fix(ios) prefix, and is specific enough for a teammate scanning history. Its length of 78 characters is acceptable.

Full details: Description check

Explanation

The description references issue #1780 and states the done criterion: deleting a source removes its overrides folder, as deleting a lease does. It names the test file index-seed-sources.test.ts and the destroySource, making-row sweep, and failed-save coverage, which all match the changeset. It also gives status and review details. It is related to the changeset and is not off-topic.

Full details: Linked Issues check

Explanation

Issue #1780 requires that deleting an iOS source also removes its launchd overrides folder, as lease deletion does, and that the same cleanup applies to #removeLeftover and failed-save cleanup. At the reviewed head, the only change to src/drivers/ios/seeds.ts adds await this.#slimBoot.removeOverrides(udid) to #deleteSeedSimulator, after bestEffortShutdown and #deleteIn. destroySource reaches this path through #deleteSeedInTurn. The failed-save cleanup in saveSource also calls #deleteSeedSimulator. A failed simulator delete throws before the new call, so the folder is kept. The added test file src/drivers/ios/index-seed-sources.test.ts (+121 lines) covers destroySource, the making-row sweep, and failed-save cleanup, and asserts the folder is removed on success and kept on failure. Limit: the seeds.ts file read was truncated at 16000 bytes, so I did not directly confirm that #removeLeftover calls #deleteSeedSimulator. The test covers the making-row sweep, which supports that path.

Full details: Out of Scope Changes check

Explanation

The whole-PR changes are: a 2-line addition in seeds.ts #deleteSeedSimulator that implements the issue requirement; a 121-line test addition in index-seed-sources.test.ts that verifies the same overrides-folder outcomes; and a one-line update to src/drivers/ios/AGENTS.md that documents the launchdOverridesRoot cleanup rule. All changes connect to #1780. No unrelated changes were found in the reviewed diff summary.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 8ee6af2a-c5ec-481e-8fa9-2936e77f36dd
Commits

Reviewing files that changed from the base of the PR and between 215147f and d60f79e.

Files selected for processing: 3

  • src/drivers/ios/AGENTS.md
  • src/drivers/ios/index-seed-sources.test.ts
  • src/drivers/ios/seeds.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Finishing Touches
Fix failing CI checks

  • Commit to this branch
  • Create a new PR

@V3RON

V3RON commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: d60f79e

Runs: 3. Cost USD: 0.492. Agent seconds: 154.
Tokens input 53, output 8129, cache read 1034632, cache write 122873.
- build implementer: claude-sonnet-5-5 96 s $0.2138
- audit implementer: claude-sonnet-5-5 21 s $0.1194
- review 1 reviewer: claude-sonnet-5-5 37 s $0.1588
Finding outcomes: {}. Classes: {}.
{"findings":[]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 24, 2026 12:46
@V3RON
V3RON merged commit 3e46439 into main Nov 24, 2026
56 of 58 checks passed
@V3RON
V3RON deleted the bug/1780 branch November 24, 2026 13:07
V3RON added a commit that referenced this pull request Nov 24, 2026
…#1824)

Two tests that reached `main` after the #1693 stack's last sync with
main fail on a Windows host. The stack merged as 191d496 and runs
every unit test there.

- **`src/push-hook.repo.test.ts`** (from #1821). Windows cannot start
`node_modules/.bin/lefthook` without a shell, so `spawnSync` gave no
status. The test now runs the package's own entry under node, joins PATH
with the host's delimiter, and passes the fake `pnpm` a `/` path for Git
Bash.
- **`src/drivers/ios/index-seed-sources.test.ts`** (from #1813). The new
baseline-overrides case expected the clone at `` `${deviceRoot}/sources`
``. It now uses `sourcesSetPath`, the sources set joined the way the
driver joins it, as the #1726 fixes did.

Test files only. Both pass on macOS. On DesktopWindows from Git Bash,
`pnpm test:unit` at 191d496 with this commit: Test Files 707 passed
(707); Tests 9686 passed | 30 skipped (9716).

## Review

Spec review: skipped. Code review: 0 blocking, 0 fixed, 0 notes. Claims
review: skipped.
Rounds: 1. Tokens: 0.3M.
Runs: 1. Cost USD: 0.1548. Agent seconds: 113.

Spec review skipped: the PR closes no issue. The reviewer read the
test-only diff itself and spawned no lens.

Assessment: complete

*Written by an agent.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS destroySource leaves a baseline's launchd overrides folder behind

1 participant